<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
       class MyClass {
            constructor(id){
                this.id = id;
            }
            // 实例方法
            instanceMethod() {
                console.log(this); // 实例对象
                
            }
        
            // 静态方法
            static staticMethod() {
                console.log(this); // MyClass类本身
                
            }
        }
        new MyClass().instanceMethod();
        MyClass.staticMethod();
    </script>
</body>
</html>